home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / cbm / 626 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  3.7 KB

  1. Path: f411.n201!not-for-mail
  2. Newsgroups: comp.sys.cbm
  3. X-Comment-To: All
  4. From: Pontus Berg <Pontus.Berg@p71.anet.canit.se>
  5. Date: Fri, 12 Jan 96 01:26:08 +0100
  6. Subject: Serial SPEED II
  7. Message-ID: <821431568@p71.f411.n201.z2.ftn>
  8. Organization: BoArDgasm, Farsta, Sweden
  9. X-FTN-AREA: CANIT_COMP_SYS_CBM
  10. X-FTN-MSGID: 2:201/411.71 30f60d10
  11. X-FTN-CHRS: IBMPC 2
  12. X-FTN-Tearline: Spot 1.3a #676
  13. X-FTN-Origin: BoArDgasm, Farsta, Sweden (2:201/411.71)
  14. X-FTN-SEEN-BY: 201/411 
  15. X-FTN-PATH: 201/411 
  16. X-FTN-PATH: 201/411
  17.  
  18. The principles for transfering FAST from modem to drive! (The reverse is also possible, but I concentrated in this direction not to mess things up)
  19.  
  20. Thought:
  21. The two SLOW part of the communications when downloading files is the serial
  22. ports - the modem and the drive! Assuming I stuffed the drive with my own
  23. recieve routine and do my own RS232 routine, there is really NO point what so
  24. ever in converting it to *bytes* in between... The bit to byte convertion EATS
  25. CPU time and the theory behind the swiftlink is to avoid this waste of the
  26. limited CPU resource! Assuming one does not have a SwiftLink;
  27.  
  28. I haven't got a clue how the DSR/CTS/RTS/DTR's are ACTUALLY used, but see this
  29. as a principle that is probably all wrong implemented! This is also only for
  30. trasnfering FILES as chars to apeear on the screen have no rason to be in the
  31. drive! (Is it possible to run 2400 for screen display and f.ex. 9600 for files -
  32. can you set a higher baudrate in mid-conversation? I assumed you can!)
  33.  
  34. What about this for transfering two bits:
  35.  
  36. x_bits  LDY #(Clear to send)
  37.  
  38.         LDX $DD01       ;4
  39.         STY $DD01       ;4
  40.         LDA Table1,X    ;4
  41.         STA $DD00       ;4
  42.  
  43.         LDX $DD01       ;4
  44.         STY $DD01       ;4
  45.         LDA Table2,X    ;4
  46.         STA $DD00       ;4
  47.  
  48.  
  49. This repeated 4 times would fetch 8 bits and send the bits to the drive. The
  50. two tables are convertions to have the data bit from the modem (bit 0) emerge at
  51. bit 7 in the accumulator after the read and two of them are there just to have
  52. one with bit 6 (serial CLK) set to 0 in one and 1 in the other...
  53.  
  54. I hear you cry that there is no error check but I did think of that!
  55.  
  56. Say you transfer 256 bytes this way to the drive, you let the DRIVE do the
  57. check if it got a valid sector or not. It sends back an ACK/NACK for the sector
  58. to the computer, which passes it to the modem. The computer is only a "bit
  59. carrier" and the drive does the intelligent part in the protocol.
  60.  
  61. I guess you need to waste a few cycles of overhead before or after each byte to
  62. sync the drive again, especially if it has stepped to a new track.
  63.  
  64. I realize this is a walk on thin ice! I take for granted that the modem always
  65. has things to send (a faster modem than the theoretical Xfer-rate will) as I
  66. don't await any signal from the modem that it is ready to send! I haven't sent
  67. the first "clear to send" and will have to make an exception on the last by not
  68. sending. (It would actually be much more easy to have the CTS right before the
  69. LDX but I'm not sure if the byte is returned on the bus that quick...)
  70.  
  71. Assuming that this would actually work (I never coded anything like this
  72. before) I do a small calcualtion on how fast it would actually be in
  73. theorectical transfer speed from the modem to the drive I get:
  74.  
  75. 63*320*50 (Cycles per PAL frame*frames per second) = 1 008 000 cycles/second
  76.  
  77. The above takes 16 cycles per bit * 8 for a byte = 96 cycles
  78.  
  79. 1 008 000 / 96 = 10 500 CPS!
  80.  
  81.  
  82. Comments are warmly welcome...
  83.  
  84.  
  85. /Pontus Berg, Bacchus@FairLight.COM
  86.  
  87. ... I asked one of the guys at the booth to demonstrate me the multitasking
  88.     abilities of his system and he replied "Please wait a few minutes sir,
  89.     as soon as this disk formatting is completed, I will show you real
  90.     multitasking..."
  91.